// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLCommentHint*;
// import com.alibaba.druid.sql.ast.SQLExpr*;
// import com.alibaba.druid.sql.ast.SQLObject*;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor*;

// import java.util.ArrayList;
// import java.util.Collections;
// import java.util.std::list;
#pragma once
#include <string>
#include <list>
#include <sstream>
#include "../SQLStatementImpl.h"
#include "../SQLExpr.h"
#include "../SQLObject.h"
#include "SQLSelect.h"

class SQLExpr;
class DbType;
class SQLASTVisitor;

class SQLSelectStatement : virtual public SQLStatementImpl
{
public:
  SQLSelect_ptr select;

  SQLSelectStatement();

  SQLSelectStatement(DbType_ptr dbType);

  SQLSelectStatement(SQLSelect_ptr select);

  SQLSelectStatement(SQLSelect_ptr select, DbType_ptr dbType);
  SHAREDOBJECT(SQLSelectStatement);

  SQLSelect_ptr getSelect();

  void setSelect(SQLSelect_ptr select);

  void output(std::stringstream * buf);

  void accept0(SQLASTVisitor_ptr visitor);

  // SQLSelectStatement *clone();
  virtual SQLObject_ptr clone();
  SQLObject_list_ptr getChildren();

  bool equals(Object_ptr o);

  int hashCode();

  string_list_ptr computeSelecteListAlias();

  BOOL_ptr addWhere(SQLExpr_ptr where);

  void addBeforeComment(string_ptr comment);

};
